package com.jeff.android.lab.architecture.arouter.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.jeff.android.lab.BaseActivity;
import com.jeff.android.lab.R;
import com.jeff.android.lab.commonlib.router.Constant;

/**
 * @author: duff
 * @date: 2019/3/12
 * @since: 1.0.0
 */
@Route(path = Constant.ACTIVITY_URL_TWO, group = "mine")
public class TwoActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_two);
        setTitle("Two");

        findViewById(R.id.btn_finish).setOnClickListener(
                v -> {
                    Intent data = new Intent();
                    data.putExtra("from", "我来自火星");
                    setResult(RESULT_OK, data);
                    finish();
                });
    }

}
